package com.shycloud.mido.music.mapper;

import java.util.List;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.shycloud.mido.music.domain.MisMusicCollection;
import com.shycloud.mido.music.dto.MisMusicCollectionDTO;
import com.shycloud.mido.music.vo.CollCourseWareVO;
import org.apache.ibatis.annotations.Param;

/**
 * 曲集模块 mapper
 *
 * @author nianhua.jiang
 * @date 2020/5/6 15:16
 */
public interface MisMusicCollectionMapper extends BaseMapper<MisMusicCollection> {

	/**
	 * 分页获取曲集信息
	 *
	 * @param
	 * @return com.baomidou.mybatisplus.core.metadata.IPage
	 * @author nianhua.jiang
	 * @date 2020/5/6 15:15
	 */
	Integer updateMusicFileStatus(@Param("collectionId") Integer collectionId);

	Integer updateMusicDelFlag(@Param("collectionId") Integer collectionId);

	List<Integer> selectLibraryIdsById(@Param("collectionId") Integer collectionId);

	IPage<MisMusicCollectionDTO> getMusicConllectionMobile(@Param("page") Page page, @Param("libraryId") Integer libraryId,
			@Param("memberId") String memberId, @Param("chargeType") Integer chargeType);

	IPage<MisMusicCollectionDTO> getMusicConllection(@Param("page") Page page, @Param("libraryId") Integer libraryId,
			@Param("collectionName") String collectionName, @Param("collectionId") Integer collectionId,
			@Param("status") String status);

	MisMusicCollection getValidCollectionById(@Param("collectionId") Integer collectionId);

	Integer changeVIPStatus(@Param("status") String status, @Param("collectionId") Integer collectionId);

	//查找该曲集是否在购物车内
	Integer checkCartStatus(@Param("memberId") String memberId, @Param("collectionId") Integer collectionId);

	List<CollCourseWareVO> getMusicConllectionCourseware(@Param("libId") Integer libId);

	MisMusicCollection getCollByMusicId(@Param("musicId") Integer musicId);
}